package org.daochong.lang;

import java.util.Locale;

public class LocaleContext {

	public static final ThreadLocal<Locale> LOCALES = new ThreadLocal<Locale>();

	public static Locale getLocale() {
		Locale locale = LOCALES.get();
		if (locale == null) {
			return Locale.SIMPLIFIED_CHINESE;
		}
		return locale;
	}

	public static void setLocale(Locale locale) {
		LOCALES.set(locale);
	}
}
